<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    name:<input v-model="name"/><br/>
    age:<input v-model="age"/><br/>
    <button @click="fun_a">发送</button>
    <hr/>
    {{result}}
</div>
</body>
</html>
<script src="js/vue.min.js"></script>
<script src="js/axios.min.js"></script>
<script>
    new Vue({
        el: '#app',
        data() {
            return {
                name: '',
                age: '',
                result: ''
            }
        },
        methods: {
            fun_a() {
                // 封装数据
                let data = new URLSearchParams()
                data.append('name', this.name)
                data.append('age', this.age)
                axios({
                    method: 'post',
                    url: 'third',
                    data: data
                }).then(resp => {
                    this.result = resp.data.data
                })
            }
        }
    })
</script>